How to create a Calculated control in a report.In the Report Design view, choose the 'Text Box' button from the Toolbox. Enter the expression either directly into the text box or by using the text box property sheet. 1) If the Database window is not active, activate the Database window. 2) Choose the 'Reports' tab in the Database window. < 3) Select the desired report from the list box. (The selected report is highlighted.) 4) Choose the 'Design' button. (The selected report appears in the Design view, and the floating Toolbox appears.) 5) Make sure the 'Control Wizard' button located in the 'Toolbox' is depressed. < 6) Single-click on the 'Text Box' button from Toolbox. 7) Click the desired location for the 'Text Box' in the report. (Both the label and the text box appear on the report.) < 8) Do one of the following: a) Single-click in the text box and enter the expression. < NOTE: The expression refers to at least one field from the table or query to which the report is related. When referring to the field, enclose the field name with '[' and ']' and begin the expression with the '=' operator. < b) Do the following to set properties for the control: 1] Single-click on the 'Text Box'. (Handles appear around the box.) < 2] Select the 'View' menu and 'Properties'. (The property sheet appears.) 3] Choose the 'Data' tab. < 4] Click in the 'Control Source' property box. (A drop-down list appears.) 5] Select the field(s) to be used in the expression. < NOTE: Separate each field with an operator. 6] Build the expression using the desired operators in the 'Control Source' property box. NOTE: Integers can be used as part of the expression. EXAMPLE: = < [Unitprice] > *5 (where < [Unitprice] > is a field from the selected table or query that is to be multiplied by 5). < 7] To close the property sheet, choose the 'X' button in the upper-right hand corner of the property sheet. < NOTE: The properties will be saved only when the design view is saved. 9) To edit the label box, do the following: a) Select the label box. (Handles appear around the box.) b) Select the 'View' menu and select 'Properties'. (The property sheet appears.) c) Select the 'Format' tab. d) Enter the name of the label box in the 'Caption' property box. < e) To close the property sheet, choose the 'X' button in the upper-right hand corner of the property sheet. < NOTE: The properties will be saved only when the design view is saved. Knowledge-Pak Desktop Suite (TM) Edition 5 Copyright (c) 1994-1997 by ServiceWare Inc. Subject to the terms set forth in the end-user license agreement. All rights reserved. Subject to the terms set forth in the end-user license agreement. All rights reserved. |